﻿@model OMS.Models.ItemModelView

@{
    ViewBag.Title = "AddItem";
}

<h2>Add item</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <table align=center>
        <tr>
            <td>@Html.LabelFor(m => m.Name)</td>
            <td>@Html.EditorFor(m => m.Name)</td>
            <td>@Html.ValidationMessageFor(m => m.Name)</td>
        </tr>
        <tr>
            <td>@Html.LabelFor(m => m.Description)</td>
            <td>@Html.EditorFor(m => m.Description)</td>
            <td>@Html.ValidationMessageFor(m => m.Description)</td>
        </tr>
        <tr>
            <td>@Html.LabelFor(m => m.Price)</td>
            <td>@Html.EditorFor(m => m.Price)</td>
            <td>@Html.ValidationMessageFor(m => m.Price)</td>
        </tr>
        <tr>
            <td>@Html.LabelFor(m => m.Quantity)</td>
            <td>@Html.EditorFor(m => m.Quantity)</td>
            <td>@Html.ValidationMessageFor(m => m.Quantity)</td>
        </tr>
    </table>
    <button type="submit">Add item</button>
}

<div>
    @Html.ActionLink("Back to Supervisor", "Index")
</div>